#include "comm.hpp"
//#include "log.hpp"
#include <iostream>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
using namespace std;

int main()
{
    // 找shmid
    key_t k = ftok("/home/ly/brilliant-alone/Linuxcode/IPC", 0x6666);
    int shmid = shmget(k, 4096, IPC_CREAT);
    // 挂到进程地址空间
    char* add = (char*)shmat(shmid,nullptr,0);
    //写入
    while(1)
    {
        cout << "Input:";
        fgets(add, 4096, stdin);
    }
    shmdt(add);
}
